#ifndef TRIANGLE_HPP
#define TRIANGLE_HPP

#include "shape.hpp"

/**
 * @brief 
 * This is a triangle shape clas
 *   
 * @note   
 * @retval None
*/
class Triangle : public Shape {
public:
  Triangle( vec3f &v0, vec3f &v1, vec3f &v2, vec3f &color );

  vec3f _p[3];
  vec3f _col;

private:
  bool calculateBaryCentricCoordinate(const Ray& r, f32 & tval);

  SHAPE_HIT_SIGNITURE
};

#endif